package com.zut.blocks.service.user;

import com.zut.blocks.base.common.Login;
import com.zut.blocks.base.domain.User;
import com.zut.blocks.base.service.GenericService;

import java.util.List;

/**
 * @author lxd
 * @date 2020/11/25
 */
public interface UserService extends GenericService<User, Integer> {

    /**
     * get all user
     * @return
     */
    List<User> getAllUser();

    /**
     *get user By id
     * @param id
     * @return
     */
    User getUser(int id);

    /**
     *get user By Username
     * @param userNumber
     * @return
     */
    User getUserByUserNumber(String userNumber);

    /**
     * delete user by id
     * @param id
     * @return
     */
    Integer deleteUser(int id);
    /**
     * save user
     * @param user
     * @return
     */
    User saveUser(User user);
    /**
     * save userlist
     * @param list
     * @return
     */
    List<User> saveUserList(List<User> list);
    /**
     * update user
     * @param user
     * @return
     */
    User updateUSer(User user);

    /**
     * user login
     * @param username
     * @param password
     * @return
     */
    Login login(String username, String password);
}
